package com.audaque.springboot.foshanupload.mp.util;

import com.baomidou.mybatisplus.core.toolkit.AES;

/**
 * @author zgb
 * @desc ...
 * @date 2023-03-04 21:07:12
 */
public class AESUtils {

    public static String generateRandomKey(){
        // 生成 16 位随机 AES 密钥
        String randomKey = AES.generateRandomKey();
        return randomKey;
    }


    public static String encrypt(String data,String randomKey){
        // 随机密钥加密
        String result = AES.encrypt(data, randomKey);
        return result;
    }


}
